<template>
  <div class="login-box">
     <div class="login-content">
        <div class="login-logo">
            <img src="../assets/img/17.png" class="logo">
            <div class="login-select">
                <a href="javascript:;" :class="{'active':isActive == index}"  v-for="(item,index) in list" :key="index" @click='secClick(index)' >{{item}}</a>
            </div>
        </div>
        <div class="login-form">
            <div class="form-box">
                <section class="input-box">
                    <input type="text" placeholder="手机/邮箱/用户名">
                </section>
                <section class="input-box">
                    <input type="text" placeholder="密码">
                </section>
                <button class="subtn" @click="loginAction">登录</button>
            </div>
        </div>
     </div>
     <div class="login-about">
         <a href="javascript:;">关于我们</a>
     </div>
  </div>
</template>

<script>
export default {
  name:'loginpage',
  data () {
      return{
          isActive:0,
          list:['短信登录','密码登录']
      }
  },
  methods: {
      //登录操作
      loginAction () {
           
      },
      //登录方式切换
      secClick (index){
            this.isActive = index
      }
  }
}
</script>
<style lang="scss">
@import '../../static/px2rem.scss';
body{
    background: #fff!important;
}
.login-box{
    width: 100%;
    height: auto;
    padding-top: px2rem(30);
    .login-content{
        width: px2rem(300);
        display: flex;
        flex-direction: column;
        justify-content: center;
        margin: 0 auto;
        .login-logo{
            text-align: center;
            .logo{
                display: inline-block;
                width: px2rem(140);
                height: px2rem(56);
            }
            .login-select{
                margin-top: px2rem(20);
                .active{
                    color: #2395ff;
                    border-bottom: 2px solid #2395ff;
                }
                a{  
                    margin-right: px2rem(20);
                    font-size: px2rem(14);
                    padding-bottom: px2rem(2);
                    cursor: pointer;
                    color: #333;
                }
            }
        }
        .login-form{
            min-height: px2rem(296);
             .subtn{
                    display: block;
                    width: 100%;
                    height: px2rem(42);
                    margin-top: px2rem(30);
                    border-radius: px2rem(4);
                    background: #00d762;
                    color: #fff;
                    cursor: pointer;
                    text-align: center;
                    font-size: px2rem(16);
                    line-height: px2rem(42);
                }
            .input-box{
                position: relative;
                margin-top: px2rem(20);
                height: px2rem(48);
                font-size: px2rem(14);
                background: #fff;
                input{
                    width: 100%;
                    height: 100%;
                    left: 0;
                    padding-left: px2rem(10);
                    border: 1px solid #ddd;
                    border-radius: px2rem(8);
                    color: #333;
                    display: inline-block;
                    position: absolute;
                    top: 50%;
                    right: 10px;
                    transform: translateY(-50%);
                    font-size: px2rem(14)
                }
               
            }
        }
        
    }
    .login-about{
            position: relative;
            width: 100%;
            a{
                display: block;
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%,-50%);
                text-align: center;
                color: #999;
                font-size: px2rem(12)
            }
        }
}



</style>
